package com.lwd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lwd.entity.Type;
import com.lwd.mapper.TypeMapper;
import com.lwd.service.TypeService;

@Service
public class TypeServieImpl implements TypeService {

    @Autowired
    private TypeMapper typeMapper;

    @Override
    public List<Type> getAllTypeGoods() {
        List<Type> typeGoods = typeMapper.getAllTypeGoods();
        return typeGoods;
    }

    @Override
    public List<Type> getAllTypeGoods2() {
        List<Type> typeGoods = typeMapper.getAllTypeGoods2();
        return typeGoods;
    }

    @Override
    public Type getTypeByTid(String tid) {
        Type type = typeMapper.getTypeByTid(tid);
        return type;
    }

    @Override
    public List<Type> getAllTypes() {
        return typeMapper.getAllTypes();
    }

    @Override
    public boolean addNewType(Type type) {
        int result=typeMapper.addNewType(type);
        return result>0?true:false;
    }

}
